package com.likersai.opon.pojo.vo.rsp;

import com.likersai.opon.pojo.entity.ToxicSaying;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 毒鸡汤返回
 *
 * @author sun.ye
 * @since 2022-05-26 16:56
 */
@Data
public class ToxicSayingRsp implements Serializable {
    
    private Long id;
    
    private String content;
    
    private Date createDate;
    
    public static ToxicSayingRsp from (ToxicSaying entity) {
        if (entity == null) {
            return null;
        }
        ToxicSayingRsp toxicSayingRsp = new ToxicSayingRsp();
        toxicSayingRsp.setId(entity.getId());
        toxicSayingRsp.setContent(entity.getContent());
        toxicSayingRsp.setCreateDate(entity.getCreateDate());
        return toxicSayingRsp;
    }
    
}